﻿using Downloader.Domain;

namespace Downloader.Web.Controllers.ViewModels
{
    public class CategoryViewModel
    {
        public CategoryViewModel(Category model)
        {
            this.Id = model.Id;
            this.Name = model.Name;
            this.Introduction = model.Introduction;
            this.Sequence = model.Sequence;
            this.ParentCategory = model.Parent;
        }
        /// <summary>
        /// 分类ID
        /// </summary>
        public  int Id { get; set; }
        /// <summary>
        /// 是否是子类
        /// </summary>
        public bool IsSub { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        public  string Name { get; set; }
        /// <summary>
        /// 分类介绍
        /// </summary>
        public  string Introduction { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public  int Sequence { get; set; }
        /// <summary>
        /// 分类类型
        /// </summary>
        public CategoryType CategoryType { get; set; }
        /// <summary>
        /// 父级分类
        /// </summary>
        public Category ParentCategory { get; set; }
    
    }
}